package com.ayoka.parenting.ui.grown.share;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import com.ayoka.parenting.R;
import com.ayoka.parenting.ui.live.ChatDialog;
import com.jincp.common.dialog.BaseDialogBuilder;
import com.jincp.common.dialog.BaseDialogFragment;
import com.tencent.ticsdk.core.TICManager;

/**
 * =========================================================
 * @ProjectName: 
 * @ClassName: WhiteBoardDialog
 * @Description: 
 * @Author: jincp
 * @CreateDate: 2019/9/19 16:18
 * =========================================================
 */
public class PictureOperatorDialog extends BaseDialogFragment {

    public static PictureOperatorDialog newInstance(Builder builder) {
        PictureOperatorDialog dialog = new PictureOperatorDialog();
        Bundle bundle = getArgumentBundle(builder);
        dialog.setArguments(bundle);
        return dialog;
    }


    @Override
    protected void convertView(@Nullable final View container, final BaseDialogFragment dialogFragment) {
        //返回
        container.findViewById(R.id.tv_cancel).setOnClickListener(new CloseClickListener());
        container.findViewById(R.id.tv_save_picture).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mDialogResultListener != null) {
                    mDialogResultListener.result(PictureOperatorDialog.this, "SAVE");
                }
            }
        });
        container.findViewById(R.id.tv_share_picture).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mDialogResultListener != null) {
                    mDialogResultListener.result(PictureOperatorDialog.this, "SHARE");
                }
            }
        });
    }


    @Override
    protected int getLayoutId() {
        return R.layout.dialog_picture_operator;
    }


    public static class Builder extends BaseDialogBuilder<Builder, PictureOperatorDialog> {

        @Override
        public PictureOperatorDialog build() {
            return PictureOperatorDialog.newInstance(this);
        }
    }
}